package com.mapull.example.section1;

/**
 * StringCompare
 *
 * @author mapull
 * @date 2021-08-19
 * @since 1.0
 **/
public class StringCompare {
    public static void main(String[] args) {
        System.out.println("Hello".compareTo("Hello")); // 0
        System.out.println("Hello".compareTo("World")); // -15
        System.out.println("Hello".compareTo("W"));  // -15
        System.out.println("Hello".compareTo("Hi")); // -4
        System.out.println("Hello".compareTo("hi")); // -32
        System.out.println("Hello".compareTo("Happy")); // 4
        System.out.println("Hello".compareTo("Mary")); // -5
        System.out.println("你".compareTo("You"));// 20231
        System.out.println("你".compareTo("You"));// 20231
        System.out.println("12".compareTo("78")); // -6
        System.out.println("78".compareTo("12")); // 6
    }
}
